package net.huashitong.ssydt.exam.entity.vo;

import io.swagger.annotations.ApiModelProperty;
import net.huashitong.ssydt.exam.entity.SsExamArticleRecord;

import java.util.List;

/**
 * @author <a href="mailto:yhy23456@163.com">huiyang.yu</a>
 * @since 2017.10.30
 */
public class ArticleTestRecordOutVO extends BaseRecord {

    private static final long serialVersionUID = 6000121471611476058L;

    @ApiModelProperty(value = "标题")
    private String title;//标题

    @ApiModelProperty(value = "选择题列表")
    private List<ArticleQuestion> questions;

    @ApiModelProperty(value = "文章Id")
    private Long articleId;//文章Id

    public ArticleTestRecordOutVO(SsExamArticleRecord ssExamArticleRecord) {
        setCoefficient(ssExamArticleRecord.getCoefficient());
        setQuestionNumber(ssExamArticleRecord.getQuestionNumber());
        setRecordId(ssExamArticleRecord.getId());
        setTestState(ssExamArticleRecord.getTestState());
        setFinishNumber(ssExamArticleRecord.getFinishNumber());
        setCorrectNumber(ssExamArticleRecord.getCorrectNumber());
        setCorrectAvgRate(ssExamArticleRecord.getCorrectAvgRate());
        setBeatRate(ssExamArticleRecord.getBeatRate());
        setUserTime(ssExamArticleRecord.getUserTime());
        this.title = ssExamArticleRecord.getTitle();
        this.articleId = ssExamArticleRecord.getArticleId();
    }


    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public List<ArticleQuestion> getQuestions() {
        return questions;
    }

    public void setQuestions(List<ArticleQuestion> questions) {
        this.questions = questions;
    }

    public Long getArticleId() {
        return articleId;
    }

    public void setArticleId(Long articleId) {
        this.articleId = articleId;
    }

    public static class ArticleQuestion extends BaseRecordQuestion {

        private static final long serialVersionUID = -7324948265742122630L;

        @ApiModelProperty(value = "题目记录id")
        private Long questionRecordId;//题目记录id

        public Long getQuestionRecordId() {
            return questionRecordId;
        }

        public void setQuestionRecordId(Long questionRecordId) {
            this.questionRecordId = questionRecordId;
        }
    }


}
